# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-pymsteams
pkgver=0.2.1
pkgrel=0
pkgdesc="Format messages and post to Microsoft Teams."
url="https://github.com/rveachkc/pymsteams"
arch="noarch"
license="Apache-2.0"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-requests py3-py py3-pluggy"
source="$pkgname-$pkgver.tar.gz::https://github.com/rveachkc/pymsteams/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/${pkgname/py3-/}-$pkgver

build() {
	python3 setup.py build
}

check() {
	export MS_TEAMS_WEBHOOK="https://localhost"
	python3 -m pytest -v -k "not test_message_size"
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
1b77a394d7f186ba572a53afa189151aee3fe8c78eeac9f4fc7a7b76f9ab4b2bfabe9b3efde9049dda4e48841598d96f81b445ba8705a4e8a2cd9092513d122e  py3-pymsteams-0.2.1.tar.gz
"
